/*     */ package com.jcrj.action.personalOffice;
/*     */ 
/*     */ import com.jcrj.action.BaseAction;
/*     */ import com.jcrj.entity.OFax;
/*     */ import com.jcrj.entity.OFaxReceive;
/*     */ import com.jcrj.entity.OUser;
/*     */ import com.jcrj.entity.OWorkLan;
/*     */ import com.jcrj.service.PersonalofficeService;
/*     */ import java.io.IOException;
/*     */ import java.io.PrintWriter;
/*     */ import java.io.UnsupportedEncodingException;
/*     */ import java.net.URLDecoder;
/*     */ import java.util.Date;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ import javax.servlet.http.HttpServletResponse;
/*     */ 
/*     */ public class LanguageSetAction extends BaseAction
/*     */ {
/*     */   private List<OWorkLan> workLanList;
/*     */   private PersonalofficeService personalofficeService;
/*     */   private OWorkLan oworklan;
/*     */   private String name;
/*     */   private String[] textid;
/*     */   private int bokID;
/*     */   private long pageCount;
/*     */   private long totalCount;
/*     */   private String location;
/*     */   private String message;
/*     */   private OFax fax;
/*     */   private OFaxReceive faxReceive;
/*     */   private List<OFaxReceive> receives;
/*     */   private String faxId;
/*     */   private String wordId;
/*     */   private String title;
/*     */   private String[] ids;
/*     */ 
/*     */   public String[] getIds()
/*     */   {
/*  40 */     return this.ids;
/*     */   }
/*     */   public void setIds(String[] ids) {
/*  43 */     this.ids = ids;
/*     */   }
/*     */   public String getTitle() {
/*  46 */     return this.title;
/*     */   }
/*     */   public void setTitle(String title) {
/*  49 */     this.title = title;
/*     */   }
/*     */   public OFaxReceive getFaxReceive() {
/*  52 */     return this.faxReceive;
/*     */   }
/*     */   public void setFaxReceive(OFaxReceive faxReceive) {
/*  55 */     this.faxReceive = faxReceive;
/*     */   }
/*     */   public List<OFaxReceive> getReceives() {
/*  58 */     return this.receives;
/*     */   }
/*     */   public void setReceives(List<OFaxReceive> receives) {
/*  61 */     this.receives = receives;
/*     */   }
/*     */   public String getFaxId() {
/*  64 */     return this.faxId;
/*     */   }
/*     */   public void setFaxId(String faxId) {
/*  67 */     this.faxId = faxId;
/*     */   }
/*     */   public String getWordId() {
/*  70 */     return this.wordId;
/*     */   }
/*     */   public void setWordId(String wordId) {
/*  73 */     this.wordId = wordId;
/*     */   }
/*     */   public void setFax(OFax fax) {
/*  76 */     this.fax = fax;
/*     */   }
/*     */   public String fax() {
/*  79 */     return "success";
/*     */   }
/*     */   public String saveFax() {
/*     */     try {
/*  83 */       OUser user = (OUser)super.getSession().get("userInfo");
/*  84 */       this.fax.setCreateTime(new Date());
/*  85 */       this.fax.setDel("0");
/*  86 */       this.fax.setSendId(user.getId());
/*  87 */       this.fax.setSendName(user.getName());
/*  88 */       this.fax.setWordId(this.wordId);
/*  89 */       this.personalofficeService.saveFax(this.fax);
/*  90 */       super.getResponse().getWriter().write("success");
/*  91 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/*  93 */       e.printStackTrace();
/*     */       try
/*     */       {
/*  96 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e1) {
/*  98 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/*  96 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e) {
/*  98 */         e.printStackTrace();
/*     */       }
/*     */     }
/* 101 */     return null;
/*     */   }
/*     */   public String myFax() {
/* 104 */     OUser user = (OUser)super.getSession().get("userInfo");
/* 105 */     this.totalCount = this.personalofficeService.getMyFaxCount(user, this.title, super.getStartDate(), super.getEndDate());
/* 106 */     this.pageCount = ((this.totalCount - 1L) / 10L + 1L);
/* 107 */     if (super.getCurrentPage() > this.pageCount) {
/* 108 */       super.setCurrentPage(Long.valueOf(this.pageCount).intValue());
/*     */     }
/* 110 */     this.receives = this.personalofficeService.getMyFax(user, this.title, super.getStartDate(), super.getEndDate(), super.getCurrentPage());
/* 111 */     return "success";
/*     */   }
/*     */   public String getOFax() {
/* 114 */     this.faxReceive = this.personalofficeService.getFax(this.faxId);
/* 115 */     if ("0".equals(this.faxReceive.getIfRead())) {
/* 116 */       this.faxReceive.setIfRead("1");
/* 117 */       this.personalofficeService.saveFaxReceive(this.faxReceive);
/*     */     }
/* 119 */     this.wordId = this.faxReceive.getOFax().getWordId();
/* 120 */     return "success";
/*     */   }
/*     */   public String deleteFax() {
/*     */     try {
/* 124 */       this.personalofficeService.deleteFax(this.ids);
/* 125 */       super.getResponse().getWriter().write("success");
/* 126 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/* 128 */       e.printStackTrace();
/*     */       try
/*     */       {
/* 131 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e1) {
/* 133 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/* 131 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e) {
/* 133 */         e.printStackTrace();
/*     */       }
/*     */     }
/* 136 */     return null;
/*     */   }
/*     */ 
/*     */   public String updeteturn()
/*     */   {
/* 141 */     this.oworklan = this.personalofficeService.gettext(this.bokID);
/* 142 */     return "success";
/*     */   }
/*     */ 
/*     */   public String updatetext() {
/*     */     try {
/* 147 */       this.personalofficeService.updateText(this.oworklan);
/* 148 */       super.getResponse().getWriter().write("success");
/* 149 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/* 151 */       e.printStackTrace();
/*     */       try
/*     */       {
/* 154 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e1) {
/* 156 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/* 154 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e) {
/* 156 */         e.printStackTrace();
/*     */       }
/*     */     }
/*     */ 
/* 160 */     return null;
/*     */   }
/*     */ 
/*     */   public String deletetext()
/*     */   {
/*     */     try
/*     */     {
/* 167 */       this.personalofficeService.dletetext(this.textid);
/* 168 */       super.getResponse().getWriter().write("success");
/* 169 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/* 171 */       e.printStackTrace();
/*     */       try
/*     */       {
/* 174 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e1) {
/* 176 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/* 174 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e) {
/* 176 */         e.printStackTrace();
/*     */       }
/*     */     }
/* 179 */     return null;
/*     */   }
/*     */ 
/*     */   public String addText()
/*     */   {
/* 184 */     return "success";
/*     */   }
/*     */ 
/*     */   public String saveText() {
/*     */     try {
/* 189 */       OUser user = (OUser)super.getSession().get("userInfo");
/* 190 */       this.oworklan.setUserId(user.getId());
/* 191 */       this.oworklan.setCreateTime(new Date());
/* 192 */       this.personalofficeService.savelang(this.oworklan);
/* 193 */       super.getResponse().getWriter().write("success");
/* 194 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/* 196 */       e.printStackTrace();
/*     */       try
/*     */       {
/* 199 */         super.getResponse().getWriter().close();
/*     */       } catch (Exception e1) {
/* 201 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/* 199 */         super.getResponse().getWriter().close();
/*     */       } catch (Exception e) {
/* 201 */         e.printStackTrace();
/*     */       }
/*     */     }
/* 204 */     return null;
/*     */   }
/*     */ 
/*     */   public String getlang()
/*     */   {
/* 209 */     OUser user = (OUser)super.getSession().get("userInfo");
/* 210 */     this.totalCount = this.personalofficeService.countLang(user.getId().intValue(), this.name).longValue();
/* 211 */     this.pageCount = ((this.totalCount - 1L) / 10L + 1L);
/* 212 */     if (super.getCurrentPage() > this.pageCount) {
/* 213 */       super.setCurrentPage(Long.valueOf(this.pageCount).intValue());
/*     */     }
/* 215 */     this.workLanList = this.personalofficeService.getlang(user.getId().intValue(), this.name, super.getCurrentPage());
/* 216 */     return "success";
/*     */   }
/*     */ 
/*     */   public String getWorkLanAll() {
/*     */     try {
/* 221 */       OUser user = (OUser)super.getSession().get("userInfo");
/* 222 */       this.workLanList = this.personalofficeService.getWorkLanList(user.getId().intValue());
/* 223 */       this.message = URLDecoder.decode(URLDecoder.decode(this.message, "UTF-8"), "UTF-8");
/*     */     } catch (UnsupportedEncodingException e) {
/* 225 */       e.printStackTrace();
/*     */     }
/* 227 */     return "success";
/*     */   }
/*     */   public String getWorkLanContent() {
/*     */     try {
/* 231 */       super.getResponse().setCharacterEncoding("UTF-8");
/* 232 */       OWorkLan lan = this.personalofficeService.gettext(this.bokID);
/* 233 */       super.getResponse().getWriter().write(lan.getContent());
/* 234 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/* 236 */       e.printStackTrace();
/*     */       try
/*     */       {
/* 239 */         super.getResponse().getWriter().close();
/*     */       } catch (Exception e1) {
/* 241 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/* 239 */         super.getResponse().getWriter().close();
/*     */       } catch (Exception e) {
/* 241 */         e.printStackTrace();
/*     */       }
/*     */     }
/* 244 */     return null;
/*     */   }
/*     */ 
/*     */   public List<OWorkLan> getWorkLanList()
/*     */   {
/* 249 */     return this.workLanList;
/*     */   }
/*     */ 
/*     */   public void setWorkLanList(List<OWorkLan> workLanList) {
/* 253 */     this.workLanList = workLanList;
/*     */   }
/*     */ 
/*     */   public PersonalofficeService getPersonalofficeService() {
/* 257 */     return this.personalofficeService;
/*     */   }
/*     */ 
/*     */   public void setPersonalofficeService(PersonalofficeService personalofficeService)
/*     */   {
/* 262 */     this.personalofficeService = personalofficeService;
/*     */   }
/*     */ 
/*     */   public OWorkLan getOworklan() {
/* 266 */     return this.oworklan;
/*     */   }
/*     */ 
/*     */   public void setOworklan(OWorkLan oworklan) {
/* 270 */     this.oworklan = oworklan;
/*     */   }
/*     */ 
/*     */   public String[] getTextid() {
/* 274 */     return this.textid;
/*     */   }
/*     */ 
/*     */   public void setTextid(String[] textid) {
/* 278 */     this.textid = textid;
/*     */   }
/*     */ 
/*     */   public int getBokID()
/*     */   {
/* 283 */     return this.bokID;
/*     */   }
/*     */ 
/*     */   public void setBokID(int bokID)
/*     */   {
/* 288 */     this.bokID = bokID;
/*     */   }
/*     */ 
/*     */   public String getName() {
/* 292 */     return this.name;
/*     */   }
/*     */ 
/*     */   public void setName(String name) {
/* 296 */     this.name = name;
/*     */   }
/*     */ 
/*     */   public long getPageCount() {
/* 300 */     return this.pageCount;
/*     */   }
/*     */ 
/*     */   public void setPageCount(long pageCount) {
/* 304 */     this.pageCount = pageCount;
/*     */   }
/*     */ 
/*     */   public long getTotalCount() {
/* 308 */     return this.totalCount;
/*     */   }
/*     */ 
/*     */   public void setTotalCount(long totalCount) {
/* 312 */     this.totalCount = totalCount;
/*     */   }
/*     */ 
/*     */   public String getLocation() {
/* 316 */     return this.location;
/*     */   }
/*     */ 
/*     */   public void setLocation(String location) {
/* 320 */     this.location = location;
/*     */   }
/*     */ 
/*     */   public String getMessage() {
/* 324 */     return this.message;
/*     */   }
/*     */ 
/*     */   public void setMessage(String message) {
/* 328 */     this.message = message;
/*     */   }
/*     */   public OFax getFax() {
/* 331 */     return this.fax;
/*     */   }
/*     */ }

/* Location:           /Volumes/work/oa/WEB-INF/classes/
 * Qualified Name:     com.jcrj.action.personalOffice.LanguageSetAction
 * JD-Core Version:    0.6.0
 */